### CSV format details

Materialize uses the format method you specify to determine the number of
columns to create in the source, as well as the columns' names.

Method | Outcome
-------|--------
**HEADER** | Materialize reads the first line of the file to determine:<br/><br/>&bull; The number of columns in the file<br/><br/>&bull; The name of each column<br/><br/>The first line of the file is not ingested as data.
_n_ **COLUMNS** | &bull; Materialize treats the file as if it has _n_ columns.<br/><br/>&bull; Columns are named `column1`, `column2`...`columnN`.

Note that:

- You can override these naming conventions by explicitly naming columns using
  the _col&lowbar;name_ option in `CREATE SOURCE`.
- All rows without the number of columns determined by the format are dropped,
  and Materialize logs an error.

#### Types

Materialize treats all columns in CSV sources as [`text`](/sql/types/text).
You can "type" this data using [casts](/sql/functions/cast/) when creating views
using this source, e.g.:

```sql
CREATE MATERIALIZED VIEW salaries AS
  SELECT (employee_id::int, salary::numeric(38, 2))
  FROM csv_employee_data;
```
